package com.plian.system.entity.yth.stafffiles;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import com.plian.system.entity.yth.YthBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.Valid;
import java.time.LocalDate;
import java.util.List;

/**
 * 人事——员工基础信息档案实体类
 *
 * @author zke
 * @since 2023-02-10
 */
@Data
@TableName("personnel_person")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "Person对象", description = "人事——员工基础信息档案")
@Valid
public class Person extends YthBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;
    /**
     * 性别
     */
    @ApiModelProperty(value = "性别")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer sex;
    /**
     * 出生日期
     */
    @ApiModelProperty(value = "出生日期")
    private LocalDate birthday;
    /**
     * 证件类型
     */
    @ApiModelProperty(value = "证件类型")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer certificatesType;
    /**
     * 证件号码
     */
    @ApiModelProperty(value = "证件号码")
    private String certificatesNumber;
    /**
     * 民族
     */
    @ApiModelProperty(value = "民族")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer nation;
    /**
     * 政治面貌
     */
    @ApiModelProperty(value = "政治面貌")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer political;
    /**
     * 国籍
     */
    @ApiModelProperty(value = "国籍")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer nationality;
    /**
     * 籍贯
     */
    @ApiModelProperty(value = "籍贯")
    private String nativePlace;
    /**
     * 入党/团时间
     */
    @ApiModelProperty(value = "入党/团时间")
    private LocalDate joinDate;
    /**
     * 婚姻状况
     */
    @ApiModelProperty(value = "婚姻状况")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer maritalStatus;
    /**
     * 健康状态
     */
    @ApiModelProperty(value = "健康状态")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer healthStatus;
    /**
     * 当前单位id
     */
    @ApiModelProperty(value = "当前单位id")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Long companyId;
    /**
     * 当前单位名称
     */
    @ApiModelProperty(value = "当前单位名称")
    private String companyName;
    /**
     * 最高学历
     */
    @ApiModelProperty(value = "最高学历")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer highestEducation;
    /**
     * 最高学位
     */
    @ApiModelProperty(value = "最高学位")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer highestDegree;
    /**
     * 专业技术职务
     */
    @ApiModelProperty(value = "专业技术职务")
    private String technicalPosition;
    /**
     * 职业资格
     */
    @ApiModelProperty(value = "职业资格")
    private String professionalQualification;
    /**
     * 参加工作时间
     */
    @ApiModelProperty(value = "参加工作时间")
    private LocalDate workingDate;
    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Long linkPhone;
    /**
     * 电子邮件
     */
    @ApiModelProperty(value = "电子邮件")
    private String email;
    /**
     * 工作电话
     */
    @ApiModelProperty(value = "工作电话")
    private String workPhone;
    /**
     * 家庭住址
     */
    @ApiModelProperty(value = "家庭住址")
    private String address;
    /**
     * 出生地
     */
    @ApiModelProperty(value = "出生地")
    private String birthplace;
    /**
     * 户籍所在地
     */
    @ApiModelProperty(value = "户籍所在地")
    private String registeredResidence;
    /**
     * 紧急联系人
     */
    @ApiModelProperty(value = "紧急联系人")
    private String emergencyContactName;
    /**
     * 紧急联系人联系方式
     */
    @ApiModelProperty(value = "紧急联系人联系方式")
    private String emergencyContactPhone;

    /**
     * 是否属于组织内档案
     */
    @ApiModelProperty(value = "是否属于组织内档案")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    private Integer isInOrg;


    /**
     * 入职信息
     */
    @TableField(exist = false)
    private PersonStaffPost staffPost;


    /**
     * 入职信息
     */
    @TableField(exist = false)
    private List<PersonEducation> educations;

    /**
     * 任免记录
     */
    @TableField(exist = false)
    private List<PersonAppoRemoval> appoRemovals;

    /**
     * 奖罚情况
     */
    @TableField(exist = false)
    private List<PersonReward> rewards;
    /**
     * 年度考核
     */
    @TableField(exist = false)
    private List<PersonYearAssessment> yearAssessments;

    /**
     * 年度考核
     */
    @TableField(exist = false)
    private List<PersonFamily> families;

    /**
     * 从业资格证书
     */
    @TableField(exist = false)
    private List<PersonCertificate> certificates;
    /**
     * 专业技术资格
     */
    @TableField(exist = false)
    private List<PersonTechnology> technologies;
    /**
     * 培训情况
     */
    @TableField(exist = false)
    private List<PersonTrain> trains;
    /**
     * 侨眷情况
     */
    @TableField(exist = false)
    private List<PersonOverseasMember> overseasMembers;
}
